/*
    This file is part of PHANTOM
         P reprocessed 
         H igh-level 
         A llocator 
         N ested state-machines and 
         T emplate 
         O riented 
         M eta-programming

    For the latest infos and sources, see http://code.google.com/p/phantom-cpp

    Copyright (C) 2008-2011 by Vivien MILLET

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in
    all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    THE SOFTWARE
*/

#ifndef o_phantom_exceptions_h__
#define o_phantom_exceptions_h__



/* ****************** Includes ******************* */
/* *********************************************** */

o_namespace_begin(phantom, exception)

#if (o_COMPILER == o_COMPILER_VISUAL_STUDIO)
typedef std::exception base_exception;
#else
class base_exception : std::exception
{
public:
    base_exception(void) {}
    base_exception(const char * const & _What)
    {

    }
};
#endif


class invalid_argument_exception : public base_exception
{
public:
    invalid_argument_exception(void) : base_exception("Invalid argument") {}
    invalid_argument_exception(const char * const & _What)
        : base_exception(_What)
    {

    }
};

class invalid_parsing_exception : public base_exception
{
public:
    invalid_parsing_exception(void) {}
    invalid_parsing_exception(const char * const & _What)
        : base_exception(_What)
    {

    }
};

class reflection_runtime_exception : public base_exception
{
public:
    reflection_runtime_exception(void) {}
    reflection_runtime_exception(const char * const & _What)
        : base_exception(_What)
    {

    }
};

class unknown_reflection_type_exception : public reflection_runtime_exception
{
public:
    unknown_reflection_type_exception(void) {}
    unknown_reflection_type_exception(const char * const & _What)
        : reflection_runtime_exception(_What)
    {

    }
};

template<typename t_Ty>
class t_unknown_reflection_type_exception : public unknown_reflection_type_exception
{
public:
    t_unknown_reflection_type_exception(void) {}
    t_unknown_reflection_type_exception(const char * const & _What)
        : unknown_reflection_type_exception(_What)
    {

    }
};


class unsupported_member_function_exception : public base_exception
{
public:
    unsupported_member_function_exception(void) {}
    unsupported_member_function_exception(const char * const & _What)
        : base_exception(_What)
    {

    }
};

class unserializable_exception : public base_exception
{
public:
    unserializable_exception(void) {}
    unserializable_exception(const char * const & _What)
        : base_exception(_What)
    {

    }
};

o_namespace_end(phantom, exception)

#endif // o_phantom_exceptions_h__
